<?php
		include "lib_func.php";
		
		$email = $_POST['email'];
		$pass  = md5($_POST['pass']);
		
		$koneksi = koneksi_db();
		$sql 	 = "select email,password,idmember from member where email='$email' and password='$pass'";
		$query 	 = mysql_query($sql,$koneksi);
		$cekAda  = mysql_num_rows($query);
		$f 		 = mysql_fetch_array($query);
		
		if ($cekAda == 0) {
			echo "<script language='javascript'>alert('Maaf Anda belum terdaftar menjadi member kami !');</script>";
			echo "<script language='javascript'>window.location = '../sign_up.php'</script>";
		}else{
						
		
			$_SESSION['email'] = $email;
			$_SESSION['pass'] = $pass;
			$_SESSION['idmember'] = $f['idmember'];
			
			echo "<script language='javascript'>window.location = '../index.php'</script>";
		}
	// AKHIR DARI PROSES LOGIN
?>